package service;

import dao.UserDao;
import dao.UserDaoImpl;
import dao.UserDaoMySqlImpl;

/*
public class UserServiceImpl implements UserService {
    private UserDao userDao = new UserDaoImpl();

    private UserDao userDao1 = new UserDaoMySqlImpl();


    @Override
    public void getUser() {
        userDao.getUser();
        userDao1.getUser();
    }
}
*/
public class UserServiceImpl implements UserService {
    private UserDao userDao;


    // 利用set实现
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void getUser() {
        userDao.getUser();
    }
}